<?php
	header("Content-Type: text/html;charset=utf-8");
	include("../_judge.php");
	include("../../function/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?= $adminweb_titles ?></title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../../script/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" href="../../SunbeamEditor/themes/default/default.css" />
<link rel="stylesheet" href="../../SunbeamEditor/plugins/code/prettify.css" />
<script charset="utf-8" src="../../SunbeamEditor/kindeditor.js"></script>
<script charset="utf-8" src="../../SunbeamEditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="../../SunbeamEditor/plugins/code/prettify.js"></script>
<script language="javascript">
	KindEditor.ready(function(K) {
		var editor = K.editor({
			allowFileManager : false
		});
		$('.image1').live("click",function(){
			var mid = K(this).attr('mid');
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('.bigclass_pic_' + mid).val(),
					clickFn : function(url, title, width, height, border, align) {
						K('.bigclass_pic_' + mid).val(url);
						editor.hideDialog();
					}
				});
			});
		});
	});
	$(document).ready(function(){
		$("#ckall").click(function(){
			if(this.checked){
				$("input[name='newsid[]']").attr('checked', true)  
			}else{   
				$("input[name='newsid[]']").attr('checked', false)  
			}   
		});
	});
</script>
</head>

<body>

<table width="97%" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td><strong>后台管理</strong>&nbsp;-&nbsp;<span class="hong"><strong>类别管理</strong></span></td>
  </tr>
</table>
<br />

<!--<form action="newsaddsave.php?action=del" method="post" name="myform" id="myform">
--><table width="97%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#000000" class="ClassTable">
  <tr bgcolor="#336699">
    <td width="25" height="25" align="center">&nbsp;<span class="bai12">ID</span></td>
    <td align="center"><span class="bai12">类别名称</span></td>
    <td align="center"><span class="bai12">备注</span></td>
    <td width="145" align="center"><span class="bai12">上传图片</span></td>
    <td width="120" align="center"><span class="bai12">链接地址</span></td>
    <td width="50" align="center"><span class="bai12">导航</span></td>
    <td width="60" align="center"><span class="bai12">页面形式</span></td>
    <td width="60" align="center"><span class="bai12">父ID</span></td>
    <td width="50" align="center"><span class="bai12">排序</span></td>
    <td width="80" align="center"><span class="bai12">管理</span></td>
  </tr>
  
<?php
		$news_sql = "select * from kboy_bigclass where pid=0 order by bigclass_order asc, id asc";
		$news_rows = mysql_query($news_sql);
		$news_nums = mysql_num_rows($news_rows);
		while($news_rs = mysql_fetch_array($news_rows)){
?>
		
		<form id="myform<?=$news_rs['id']?>" name="myform<?=$news_rs['id']?>" method="post" action="newsaddsave.php?action=edit&id=<?=$news_rs['id']?>">
		  <tr bgcolor="#efefef" onMouseOver="this.style.background='#C9C9C9'" onMouseOut="this.style.background='#efefef'">
			<td height="25" align="center"><?=$news_rs['id']?><a name="Anchor<?=$news_rs['id']?>"></a></td>
			<td><input name="bigclass_cn" type="text" id="bigclass_cn" value="<?=$news_rs['bigclass_cn']?>" size="35" maxlength="50" />
              <a href="newsaddsave.php?action=add&id=<?=$news_rs['id']?>">添子类</a></td>
			<td><input name="bigclass_text" type="text" id="bigclass_text" value="<?=$news_rs['bigclass_text']?>" size="20" maxlength="50" /></td>
			<td><input class="bigclass_pic_<?=$news_rs['id']?>" name="bigclass_pic" type="text" id="bigclass_pic" value="<?=$news_rs['bigclass_pic']?>" size="10" /><input class="image1" type="button" name="Submit" value="上传" mid="<?=$news_rs['id']?>" /></td>
			<td align="center"><input name="bigclass_urls" type="text" id="bigclass_urls" value="<?=$news_rs['bigclass_urls']?>" size="15" /></td>
			<td align="center"><select name="bigclass_menu" id="bigclass_menu"><?=getWebOption($news_rs['bigclass_menu'],1)?></select></td>
			<td align="center"><select name="bigclass_style" id="bigclass_style"><?=getWebOption($news_rs['bigclass_style'],2)?></select></td>
			<td align="center"><input name="pid" type="text" id="pid" value="<?=$news_rs['pid']?>" size="2" maxlength="5" onblur="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" class="onBlurV" /></td>
			<td align="center"><input name="bigclass_order" type="text" id="bigclass_order" value="<?=$news_rs['bigclass_order']?>" size="2" maxlength="5" onblur="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" /></td>
			<td align="center"><input type="submit" name="Submit2" value="修改" /><a href="newsaddsave.php?action=del&id=<?=$news_rs['id']?>">删除</a></td>
		  </tr>
		 </form>
<?php
			getSoonClass_tr($news_rs['id'],$spacestr."&nbsp;&nbsp;"); // 获取ID下的所有子分类
		
		}// while结束
		
		if($news_nums > 0){
			?>
			<?php
		}
			?>
</table>
<!--</form>
--><br />
<table width="97%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#D1D1D1">
  <tr bgcolor="#336699">
	<td align="center" bgcolor="#EFEFEF"><a href="newsaddsave.php?action=addbigclass" class="link16">添加信息类别</a></td>
  </tr>
</table>
</body>
</html>